package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "quotation_", schema = "boot", catalog = "")
public class Quotation {//报价单
    private int quotationId;//报价单id
    private String quotationName;//报价主题
    private String quotationOdd;//报价单号
    private BigDecimal quotationMoney;//预估毛利
    private BigDecimal quotationPrice;//报价
    private String quotationMan;//报价人
    private String quotationLinkman;//接收人
    private String quotationApproval;//审批状态
    private Date quotationUpdatetime;//报价日期
    private int quotationSc;//删除状态
    private Kehu kehu;//客户id
    private Sales sales;//销售机会

    @Id
    @Column(name = "Quotation_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getQuotationId() {
        return quotationId;
    }

    public void setQuotationId(int quotationId) {
        this.quotationId = quotationId;
    }

    @Basic
    @Column(name = "Quotation_name", nullable = true, length = 200)
    public String getQuotationName() {
        return quotationName;
    }

    public void setQuotationName(String quotationName) {
        this.quotationName = quotationName;
    }

    @Basic
    @Column(name = "Quotation_odd", nullable = true, length = 200)
    public String getQuotationOdd() {
        return quotationOdd;
    }

    public void setQuotationOdd(String quotationOdd) {
        this.quotationOdd = quotationOdd;
    }

    @Basic
    @Column(name = "Quotation_money", nullable = true, precision = 2)
    public BigDecimal getQuotationMoney() {
        return quotationMoney;
    }

    public void setQuotationMoney(BigDecimal quotationMoney) {
        this.quotationMoney = quotationMoney;
    }

    @Basic
    @Column(name = "Quotation_price", nullable = true, precision = 2)
    public BigDecimal getQuotationPrice() {
        return quotationPrice;
    }

    public void setQuotationPrice(BigDecimal quotationPrice) {
        this.quotationPrice = quotationPrice;
    }

    @Basic
    @Column(name = "Quotation_man", nullable = true, length = 200)
    public String getQuotationMan() {
        return quotationMan;
    }

    public void setQuotationMan(String quotationMan) {
        this.quotationMan = quotationMan;
    }

    @Basic
    @Column(name = "Quotation_approval", nullable = true, length = 200)
    public String getQuotationApproval() {
        return quotationApproval;
    }

    public void setQuotationApproval(String quotationApproval) {
        this.quotationApproval = quotationApproval;
    }


    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getKehu() {
        return kehu;
    }

    public void setKehu(Kehu kehu) {
        this.kehu = kehu;
    }

    @Basic
    @Column(name = "Quotation_updatetime", nullable = true)
    public Date getQuotationUpdatetime() {
        return quotationUpdatetime;
    }

    public void setQuotationUpdatetime(Date quotationUpdatetime) {
        this.quotationUpdatetime = quotationUpdatetime;
    }

    @ManyToOne
    @JoinColumn(name = "sales_id", referencedColumnName = "sales_id")
    public Sales getSales() {
        return sales;
    }

    public void setSales(Sales sales) {
        this.sales = sales;
    }

    @Basic
    @Column(name = "Quotation_sc", nullable = true)
    public int getQuotationSc() {
        return quotationSc;
    }

    public void setQuotationSc(int quotationSc) {
        this.quotationSc = quotationSc;
    }

    @Basic
    @Column(name = "Quotation_linkman", nullable = true)
    public String getQuotationLinkman() {
        return quotationLinkman;
    }

    public void setQuotationLinkman(String quotationLinkman) {
        this.quotationLinkman = quotationLinkman;
    }


    @Override
    public String toString() {
        return "Quotation{" +
                "quotationId=" + quotationId +
                ", quotationName='" + quotationName + '\'' +
                ", quotationOdd='" + quotationOdd + '\'' +
                ", quotationMoney=" + quotationMoney +
                ", quotationPrice=" + quotationPrice +
                ", quotationMan='" + quotationMan + '\'' +
                ", quotationLinkman='" + quotationLinkman + '\'' +
                ", quotationApproval='" + quotationApproval + '\'' +
                ", quotationUpdatetime=" + quotationUpdatetime +
                ", quotationSc=" + quotationSc +
                ", kehu=" + kehu +
                ", sales=" + sales +
                '}';
    }
}
